﻿using EasyXaf.EntityDesigner.BusinessObjects;

namespace EasyXaf.EntityDesigner.Tools.Extensions;

public static class BooleanExtensions
{
    public static DefaultBoolean ToDefaultBoolean(this bool? boolean)
    {
        return boolean switch
        {
            false => DefaultBoolean.False,
            true => DefaultBoolean.True,
            _ => DefaultBoolean.Default
        };
    }
}
